package com.punch.common.dto.user.student;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 学生信息表
 *
 * @author tanchangguo
 * @email 17607195327@163.com
 * @date 2020-07-21 19:10:02
 */
@Data
@ApiModel(value = "新增学生信息表")
public class StudentDTO {

    @ApiModelProperty(value = "学生id")
    private Long studentId;

    @ApiModelProperty(value = "姓名", required = true)
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "生日", required = true)
    @NotNull(message = "生日不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate birthday;

    @ApiModelProperty(value = "年级", required = true)
    @NotNull(message = "年级不能为空")
    private Integer gradeYear;

    @ApiModelProperty(value = "班级", required = true)
    @NotBlank(message = "班级不能为空")
    private String gradeClass;

    @ApiModelProperty(value = "家长电话", required = true)
    private String guardianMobile;

    @ApiModelProperty(value = "性别 0：女  1：男", required = true)
    @NotNull(message = "性别不能为空")
    private Integer sex;

    @ApiModelProperty(value = "区域id")
    private Integer areaId;

    /**
     * 0：禁用  1启用
     */
    @ApiModelProperty(value = " 0：禁用  1启用")
    private Integer enabled;

}
